﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="Scripts/jquery-1.6.4.min.js"></script>
    <script src="Scripts/jquery.signalR-1.1.4.min.js"></script>
    <script src="/signalr/hubs"></script>
    <script>
        $(function ()
        {
            var myHub = $.connection.myHub;

            $.connection.hub.start().done(function ()
            {
                $('#myInput').bind('keydown', function ()
                {
                    myHub.server.sync(this.value);
                });
            });

            myHub.client.Sync = function (msg)
            {
                $('#myResult').html(msg);
            };
        });
    </script>

</head>
<body>
    <input type="text" id="myInput" />
    <div id="myResult"></div>
</body>
</html>
